/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-25 17:42:54
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-05-21 10:31:39
 * @FilePath: /yt-devops/lib/pages/devices/device_tab/device_detail/electricity_meter_detail/electricity_meter_detail_model.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:get/get.dart';
import 'package:yt_devops/pages/devices/device_tab/model/device_item_model.dart';
import 'package:yt_devops/resources/resources.dart';
import 'package:yt_devops/resources/str_res_keys.dart';

class ElectricityMeterModel {
  String title;
  String icon;
  List<DetailItemModel> item;

  ElectricityMeterModel(
      {this.title = '', required this.icon, required this.item});
}

class ElectricityMeterList {
  List<ElectricityMeterModel> grid = [
    ElectricityMeterModel(
      title: ResKey.gunCurrent.tr, //'电流(A）',
      icon: ImageAssets.iconCurrent,
      item: [
        DetailItemModel(label: 'A相', field: 'Ia'),
        DetailItemModel(label: 'B相', field: 'Ib'),
        DetailItemModel(label: 'C相', field: 'Ic'),
      ],
    ),
    ElectricityMeterModel(
      title: ResKey.gunVoltage.tr, // '电压(V）',
      icon: ImageAssets.iconVoltage,
      item: [
        DetailItemModel(label: 'A相', field: 'Ua'),
        DetailItemModel(label: 'B相', field: 'Ub'),
        DetailItemModel(label: 'C相', field: 'Uc'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceActivePower.tr}(kW）', // '有功功率(kW）',
      icon: ImageAssets.iconActivePower,
      item: [
        DetailItemModel(label: 'A相', field: 'Pa'),
        DetailItemModel(label: 'B相', field: 'Pb'),
        DetailItemModel(label: 'C相', field: 'Pc'),
        DetailItemModel(label: '总', field: 'P'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceReactivePower.tr}(kvar）', //'无功功率(kvar）',
      icon: ImageAssets.iconReactivePower,
      item: [
        DetailItemModel(label: 'A相', field: 'Qa'),
        DetailItemModel(label: 'B相', field: 'Qb'),
        DetailItemModel(label: 'C相', field: 'Qc'),
        DetailItemModel(label: '总', field: 'Q'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceLineVoltage.tr}(V）', //'线电压(V）',
      icon: ImageAssets.iconLineVoltage,
      item: [
        DetailItemModel(label: 'AB相', field: 'Uab'),
        DetailItemModel(label: 'BC相', field: 'Ubc'),
        DetailItemModel(label: 'CA相', field: 'Uca'),
      ],
    ),
    ElectricityMeterModel(
      title: ResKey.devicePowerFactor.tr, //'功率因数',
      icon: ImageAssets.iconPowerFactor,
      item: [
        DetailItemModel(label: 'A相', field: 'COSa'),
        DetailItemModel(label: 'B相', field: 'COSb'),
        DetailItemModel(label: 'C相', field: 'COSc'),
        DetailItemModel(label: '总', field: 'COS'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceApparentPower.tr}(kVA）', // '视在功率(kVA）',
      icon: ImageAssets.iconApparentPower,
      item: [
        DetailItemModel(label: 'A相', field: 'Sa'),
        DetailItemModel(label: 'B相', field: 'Sb'),
        DetailItemModel(label: 'C相', field: 'Sc'),
        DetailItemModel(label: '总', field: 'S'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceAccumulatedElectricity.tr}(kW·h）', //'累计电量(kW·h）',
      icon: ImageAssets.iconTodayElectric,
      item: [
        DetailItemModel(label: '正向有功电量', field: 'Pimp'),
        DetailItemModel(label: '反向有功电量', field: 'Pexp'),
        DetailItemModel(label: '正向无功电量', field: 'Qimp'),
        DetailItemModel(label: '反向无功电量', field: 'Qexp'),
      ],
    ),
    ElectricityMeterModel(
      title: '${ResKey.deviceFrequency.tr}(V）', // '频率(HZ)',
      icon: ImageAssets.iconFrequency,
      item: [DetailItemModel(label: '频率', field: 'Freq')],
    ),
  ];
}
